package item.inkcloud.distributionservice.service;


import item.inkcloud.distributionservice.entity.UserInfo;
import item.inkcloud.distributionservice.mapper.UserNearByMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

@Service
public class UserNearByService {

    @Autowired
    UserNearByMapper userNearByMapper;


    public ArrayList getNearByUser(String province){
        ArrayList<UserInfo> users = new ArrayList<UserInfo>();

        try {
             users = userNearByMapper.getUserByProvince(province);
             return users;
        }catch (Exception e){

            users = null;
            return  users;

        }
    }


}
